<div class="animated fadeInRight ecommerce">

    <div class="ibox ">
        <div class="ibox-title">
            <h5>
                    <vc:i18n name="查询条件" namespace="scheduleClassesPage"></vc:i18n>
            </h5>
            <div class="ibox-tools" style="top:10px;">
                <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
                    v-on:click="_moreCondition()">
                    {{scheduleClassesPageInfo.moreCondition == true?'隐藏':'更多'}}
                </button>
            </div>
        </div>
        <div class="ibox-content">
            <div class="row">
                <div class="col-sm-3">
                    <div class="form-group">
                        <input type="text" :placeholder="vc.i18n('请输入员工名称','scheduleClassesPage')"
                            v-model="scheduleClassesPageInfo.conditions.staffNameLike" class=" form-control ">
                    </div>
                </div>
                <div class="col-sm-4">
                    <select class="custom-select" v-model="scheduleClassesPageInfo.conditions.scheduleId">
                        <option selected value="">{{vc.i18n('请选择班次','scheduleClassesPage')}}</option>
                        <option v-for="(item,index) in scheduleClassesPageInfo.scheduleClassess" :key="index"
                            v-bind:value="item.scheduleId">{{item.name}}
                        </option>
                    </select>
                </div>
                <div class="col-sm-3">
                    <div class="form-group">
                        <input type="text" :placeholder="vc.i18n('请输入日期 YYYY-MM','scheduleClassesPage')"
                            v-model="scheduleClassesPageInfo.conditions.curDate" class=" form-control queryDate">
                    </div>
                </div>
                <div class="col-sm-2">
                    <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryScheduleClassesMethod()">
                            <vc:i18n name="查询" namespace="scheduleClassesPage"></vc:i18n>
                    </button>
                    <button type="button" class="btn btn-primary btn-sm" v-on:click="_exportScheduleClasses()">
                        <i class="fa fa-plus"></i>
                        <span>
                            <vc:i18n name="导出" namespace="scheduleClassesPage"></vc:i18n>
                        </span>
                    </button>
                </div>
            </div>
            <div class="row" v-show="scheduleClassesPageInfo.moreCondition == true">
                <div class="col-sm-3">
                    <div class="form-group">
                        <input v-model="scheduleClassesPageInfo.conditions.orgName" readonly @focus="_staffChangeOrg()"
                            type="text" :placeholder="vc.i18n('必填，请选择关联组织','addStaff')" class="form-control">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="ibox">
        <div class="ibox-title">
            <h5>
                    <vc:i18n name="排班表" namespace="scheduleClassesPage"></vc:i18n>
            </h5>
            <div class="ibox-tools" style="top:10px;">
                <!-- <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddScheduleClassesModal()">
                            <i class="fa fa-plus"></i><span>
                            <vc:i18n name="添加" namespace="scheduleClassesPage"></vc:i18n></span>
                        </button> -->
            </div>
        </div>
        <div class="ibox-content ">
            <div class="hc-table-div" :style="{'width':_computeTableDivWidth()}">
                <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                    <thead>
                        <tr>
                            <th class="text-center">
                                <vc:i18n name="员工名称" namespace="scheduleClassesPage"></vc:i18n>
                            </th>
                            <th class="text-center " v-for="index in scheduleClassesPageInfo.maxDay">
                                <div>{{index}}
                                    <span>
                                        <vc:i18n name="日"></vc:i18n>
                                    </span>
                                </div>
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="staff in scheduleClassesPageInfo.staffs">
                            <td class="text-center padding-lg ">
                                <div class=" text-center  padding-lg labeling-strip">
                                    {{staff.staffName}}
                                </div>
                            </td>
                            <td class="text-center" v-for="(day,index) in staff.days">
                                <div class=" text-center border padding-lg labeling-strip"
                                    style="border-radius: 5px;cursor:pointer">
                                    <div>{{day.workdayName?day.workdayName:'休息'}}</div>
                                    <div v-for="(time,index) in day.times">
                                        {{time.startTime}}-{{time.endTime}}
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <!-- 分页 -->
            <div class="row margin-top-xs">
                <div class="col-sm-9">
                    <div></div>
                </div>
                <div class="col-sm-3 float-right">
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>

    <vc:create path="frame/chooseOrgTree" callBackListener="scheduleClassesPage"></vc:create>
</div>